function BarChart(chartDiv,title,xAxisName,yAxisName,dataMap,labelAxisPrefix){
	this.chartDiv = chartDiv;
	this.title = title;
	this.xAxisName = xAxisName;
	this.yAxisName = yAxisName;
	this.labelAxisPrefix = labelAxisPrefix;
	this.axisArray = {};
	this.dataMap = dataMap;
	this.chartString = "";
};

BarChart.prototype.generateDataString = function(){
    this.chartString ="<chart caption='"+ this.title+"' yAxisName='"+ this.yAxisName+"' xAxisName='"+ this.xAxisName+"' palette='3' baseFontSize='12'  showValues='0' canvasBorderThickness='1' canvasBorderColor='999999' plotFillAngle='330' plotBorderColor='999999' showAlternateVGridColor='1' divLineAlpha='0'>";
	var array = this.axisArray;
    for(var i in array){
    	var type = array[i];
    	var key = "key_"+type;
    	var value = this.dataMap[key];
    	var txt = $("#"+this.labelAxisPrefix+type).val();
       this.chartString +="<set label='        "+txt+"' value='"+value+"' toolText='"+txt+","+value+"'/>";
    }
     this.chartString+="</chart>";
};


BarChart.prototype.draw = function(axisArray){
	this.axisArray = axisArray;
	var chart = new FusionCharts("../static/FusionCharts/Bar2D.swf", "LineChartId", "726", "400", "0", "0");
    this.generateDataString();
    chart.setXMLData(this.chartString);
    chart.render(this.chartDiv);
};

